package com.test;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class Aspect implements MethodInterceptor {

    public void before(){
        System.out.println("前置通知执行");
    }

    public void after_return(){
        System.out.println("后置通知执行");
    }

    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        before();
        System.out.println("代理方法执行");
        Object proceed = invocation.proceed();
        after_return();
        return proceed;
    }
}
